/*
* Author        Vo Tuan Anh
* Email         votuananhs@gmail.com
*/

#include "function_demo_gpio.h"
#include "delay.h"

uint32_t RongRanNoiDuoi(uint8_t Port, uint32_t Length, uint32_t data)
{
  uint8_t i;
  for (i = 0; i < Length; i++)
  {
    data =  (0x00000001 << i) ^ data;
    GPIO_SetValue(Port, data);
    GPIO_ClearValue(Port, ~data);
    Delay(500);
  }
  return data;
}

/* controller colour led */